/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.io.Serializable;
public class Response implements Serializable {
	public Response() {
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == orm.ORMConstants.KEY_RESPONSE_PACIENTIDPACIENTE) {
			this.pacientidPaciente = (orm.Pacient) owner;
		}
		
		else if (key == orm.ORMConstants.KEY_RESPONSE_QUESTIONIDQUEST) {
			this.questionidQuest = (orm.Question) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int idResponse;
	
	private Integer response;
	
	private orm.Pacient pacientidPaciente;
	
	private orm.Question questionidQuest;
	
	private void setIdResponse(int value) {
		this.idResponse = value;
	}
	
	public int getIdResponse() {
		return idResponse;
	}
	
	public int getORMID() {
		return getIdResponse();
	}
	
	public void setResponse(int value) {
		setResponse(new Integer(value));
	}
	
	public void setResponse(Integer value) {
		this.response = value;
	}
	
	public Integer getResponse() {
		return response;
	}
	
	public void setPacientidPaciente(orm.Pacient value) {
		if (this.pacientidPaciente != value) {
			orm.Pacient lpacientidPaciente = this.pacientidPaciente;
			this.pacientidPaciente = value;
			if (value != null) {
				pacientidPaciente.setResponse(this);
			}
			else {
				lpacientidPaciente.setResponse(null);
			}
		}
	}
	
	public orm.Pacient getPacientidPaciente() {
		return pacientidPaciente;
	}
	
	public void setQuestionidQuest(orm.Question value) {
		if (questionidQuest != null) {
			questionidQuest.response.remove(this);
		}
		if (value != null) {
			value.response.add(this);
		}
	}
	
	public orm.Question getQuestionidQuest() {
		return questionidQuest;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_QuestionidQuest(orm.Question value) {
		this.questionidQuest = value;
	}
	
	private orm.Question getORM_QuestionidQuest() {
		return questionidQuest;
	}
	
	public String toString() {
		return String.valueOf(getIdResponse());
	}
	
}
